<?php
/**
 * Created by PhpStorm.
 * User: 12133
 * Date: 2024/1/15
 * Time: 17:11
 */

namespace app\controller\admin;
use app\model\admin\Config AS model;

class Config extends Base
{
    public function list()
    {
        $post = input('post.');
        if (!empty($post)) {
            foreach ($post AS $key => $value){
                model::where('key',$key)->save(['value' => $value]);
            }
        }
        $select = model::order('sort ASC')->select();
        return $this->view('/admin/config', ['list' => $select]);

    }
}